package com.sword.memcached;
import java.io.IOException;
import java.net.InetSocketAddress;

import net.spy.memcached.MemcachedClient;
  
public class TestMemcached {  
    public static void main(String[] args) throws IOException {  
        MemcachedClient cache = new MemcachedClient(new InetSocketAddress("192.168.138.128", 11211));  
//        for (int i = 1; i < 10; i++) {  
//            cache.set("T0001" + i, 3600, new User(i + ""));   
//        }  
        
        Object myObject = cache.get("key2");
        System.out.println("Get object from mem :" + new Integer(myObject.toString()));        
    }
}  